﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="读取Excel文件.aspx.cs" Inherits="数据访问控件_读取Excel文件" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>读取Excel文件</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:TemplateField>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                    编号:<%#Eval("id") %><br />
                        问：<asp:Label ID="Label1" runat="server" Text='<%#Eval("问题") %>'></asp:Label><br />
                        <br />
                        答：<asp:Label ID="Label2" runat="server" Text='<%#Eval("回答") %>'></asp:Label>
                        <hr />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        
        </asp:GridView>
    </div>
    </form>
</body>
</html>
